// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by google-apis-code-generator 1.5.1
//     C# generator version: 1.22.0
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

/**
 * \brief
 *   Replica Pool API Version v1beta1
 *
 * \section ApiInfo API Version Information
 *    <table>
 *      <tr><th>API
 *          <td><a href='https://developers.google.com/compute/docs/replica-pool/'>Replica Pool API</a>
 *      <tr><th>API Version<td>v1beta1
 *      <tr><th>API Rev<td>20160512 (497)
 *      <tr><th>API Docs
 *          <td><a href='https://developers.google.com/compute/docs/replica-pool/'>
 *              https://developers.google.com/compute/docs/replica-pool/</a>
 *      <tr><th>Discovery Name<td>replicapool
 *    </table>
 *
 * \section ForMoreInfo For More Information
 *
 * The complete API documentation for using Replica Pool API can be found at
 * <a href='https://developers.google.com/compute/docs/replica-pool/'>https://developers.google.com/compute/docs/replica-pool/</a>.
 *
 * For more information about the Google APIs Client Library for .NET, see
 * <a href='https://developers.google.com/api-client-library/dotnet/get_started'>
 * https://developers.google.com/api-client-library/dotnet/get_started</a>
 */

namespace Google.Apis.Replicapool.v1beta1
{
    /// <summary>The Replicapool Service.</summary>
    public class ReplicapoolService : Google.Apis.Services.BaseClientService
    {
        /// <summary>The API version.</summary>
        public const string Version = "v1beta1";

        /// <summary>The discovery version used to generate this service.</summary>
        public static Google.Apis.Discovery.DiscoveryVersion DiscoveryVersionUsed =
            Google.Apis.Discovery.DiscoveryVersion.Version_1_0;

        /// <summary>Constructs a new service.</summary>
        public ReplicapoolService() :
            this(new Google.Apis.Services.BaseClientService.Initializer()) {}

        /// <summary>Constructs a new service.</summary>
        /// <param name="initializer">The service initializer.</param>
        public ReplicapoolService(Google.Apis.Services.BaseClientService.Initializer initializer)
            : base(initializer)
        {
            pools = new PoolsResource(this);
            replicas = new ReplicasResource(this);
        }

        /// <summary>Gets the service supported features.</summary>
        public override System.Collections.Generic.IList<string> Features
        {
            get { return new string[0]; }
        }

        /// <summary>Gets the service name.</summary>
        public override string Name
        {
            get { return "replicapool"; }
        }

        /// <summary>Gets the service base URI.</summary>
        public override string BaseUri
        {
            get { return "https://www.googleapis.com/replicapool/v1beta1/projects/"; }
        }

        /// <summary>Gets the service base path.</summary>
        public override string BasePath
        {
            get { return "replicapool/v1beta1/projects/"; }
        }

        /// <summary>Available OAuth 2.0 scopes for use with the Replica Pool API.</summary>
        public class Scope
        {
            /// <summary>View and manage your data across Google Cloud Platform services</summary>
            public static string CloudPlatform = "https://www.googleapis.com/auth/cloud-platform";

            /// <summary>View your data across Google Cloud Platform services</summary>
            public static string CloudPlatformReadOnly = "https://www.googleapis.com/auth/cloud-platform.read-only";

            /// <summary>View and manage your Google Cloud Platform management resources and deployment status
            /// information</summary>
            public static string NdevCloudman = "https://www.googleapis.com/auth/ndev.cloudman";

            /// <summary>View your Google Cloud Platform management resources and deployment status
            /// information</summary>
            public static string NdevCloudmanReadonly = "https://www.googleapis.com/auth/ndev.cloudman.readonly";

            /// <summary>View and manage replica pools</summary>
            public static string Replicapool = "https://www.googleapis.com/auth/replicapool";

            /// <summary>View replica pools</summary>
            public static string ReplicapoolReadonly = "https://www.googleapis.com/auth/replicapool.readonly";

        }



        private readonly PoolsResource pools;

        /// <summary>Gets the Pools resource.</summary>
        public virtual PoolsResource Pools
        {
            get { return pools; }
        }

        private readonly ReplicasResource replicas;

        /// <summary>Gets the Replicas resource.</summary>
        public virtual ReplicasResource Replicas
        {
            get { return replicas; }
        }
    }

    ///<summary>A base abstract class for Replicapool requests.</summary>
    public abstract class ReplicapoolBaseServiceRequest<TResponse> : Google.Apis.Requests.ClientServiceRequest<TResponse>
    {
        ///<summary>Constructs a new ReplicapoolBaseServiceRequest instance.</summary>
        protected ReplicapoolBaseServiceRequest(Google.Apis.Services.IClientService service)
            : base(service)
        {
        }

        /// <summary>Data format for the response.</summary>
        /// [default: json]
        [Google.Apis.Util.RequestParameterAttribute("alt", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<AltEnum> Alt { get; set; }

        /// <summary>Data format for the response.</summary>
        public enum AltEnum
        {
            /// <summary>Responses with Content-Type of application/json</summary>
            [Google.Apis.Util.StringValueAttribute("json")]
            Json,
        }

        /// <summary>Selector specifying which fields to include in a partial response.</summary>
        [Google.Apis.Util.RequestParameterAttribute("fields", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Fields { get; set; }

        /// <summary>API key. Your API key identifies your project and provides you with API access, quota, and reports.
        /// Required unless you provide an OAuth 2.0 token.</summary>
        [Google.Apis.Util.RequestParameterAttribute("key", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Key { get; set; }

        /// <summary>OAuth 2.0 token for the current user.</summary>
        [Google.Apis.Util.RequestParameterAttribute("oauth_token", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string OauthToken { get; set; }

        /// <summary>Returns response with indentations and line breaks.</summary>
        /// [default: true]
        [Google.Apis.Util.RequestParameterAttribute("prettyPrint", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<bool> PrettyPrint { get; set; }

        /// <summary>Available to use for quota purposes for server-side applications. Can be any arbitrary string
        /// assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.</summary>
        [Google.Apis.Util.RequestParameterAttribute("quotaUser", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string QuotaUser { get; set; }

        /// <summary>IP address of the site where the request originates. Use this if you want to enforce per-user
        /// limits.</summary>
        [Google.Apis.Util.RequestParameterAttribute("userIp", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string UserIp { get; set; }

        /// <summary>Initializes Replicapool parameter list.</summary>
        protected override void InitParameters()
        {
            base.InitParameters();

            RequestParameters.Add(
                "alt", new Google.Apis.Discovery.Parameter
                {
                    Name = "alt",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "json",
                    Pattern = null,
                });
            RequestParameters.Add(
                "fields", new Google.Apis.Discovery.Parameter
                {
                    Name = "fields",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "key", new Google.Apis.Discovery.Parameter
                {
                    Name = "key",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "oauth_token", new Google.Apis.Discovery.Parameter
                {
                    Name = "oauth_token",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "prettyPrint", new Google.Apis.Discovery.Parameter
                {
                    Name = "prettyPrint",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "true",
                    Pattern = null,
                });
            RequestParameters.Add(
                "quotaUser", new Google.Apis.Discovery.Parameter
                {
                    Name = "quotaUser",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "userIp", new Google.Apis.Discovery.Parameter
                {
                    Name = "userIp",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
        }
    }

    /// <summary>The "pools" collection of methods.</summary>
    public class PoolsResource
    {
        private const string Resource = "pools";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public PoolsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Deletes a replica pool.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="projectName">The project ID for this replica pool.</param>
        /// <param name="zone">The zone for this
        /// replica pool.</param>
        /// <param name="poolName">The name of the replica pool for this request.</param>
        public virtual DeleteRequest Delete(Google.Apis.Replicapool.v1beta1.Data.PoolsDeleteRequest body, string projectName, string zone, string poolName)
        {
            return new DeleteRequest(service, body, projectName, zone, poolName);
        }

        /// <summary>Deletes a replica pool.</summary>
        public class DeleteRequest : ReplicapoolBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, Google.Apis.Replicapool.v1beta1.Data.PoolsDeleteRequest body, string projectName, string zone, string poolName)
                : base(service)
            {
                ProjectName = projectName;
                Zone = zone;
                PoolName = poolName;
                Body = body;
                InitParameters();
            }


            /// <summary>The project ID for this replica pool.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectName { get; private set; }

            /// <summary>The zone for this replica pool.</summary>
            [Google.Apis.Util.RequestParameterAttribute("zone", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Zone { get; private set; }

            /// <summary>The name of the replica pool for this request.</summary>
            [Google.Apis.Util.RequestParameterAttribute("poolName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string PoolName { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Replicapool.v1beta1.Data.PoolsDeleteRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{projectName}/zones/{zone}/pools/{poolName}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "zone", new Google.Apis.Discovery.Parameter
                    {
                        Name = "zone",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "poolName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "poolName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Gets information about a single replica pool.</summary>
        /// <param name="projectName">The project ID for this replica pool.</param>
        /// <param name="zone">The zone for this
        /// replica pool.</param>
        /// <param name="poolName">The name of the replica pool for this request.</param>
        public virtual GetRequest Get(string projectName, string zone, string poolName)
        {
            return new GetRequest(service, projectName, zone, poolName);
        }

        /// <summary>Gets information about a single replica pool.</summary>
        public class GetRequest : ReplicapoolBaseServiceRequest<Google.Apis.Replicapool.v1beta1.Data.Pool>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string projectName, string zone, string poolName)
                : base(service)
            {
                ProjectName = projectName;
                Zone = zone;
                PoolName = poolName;
                InitParameters();
            }


            /// <summary>The project ID for this replica pool.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectName { get; private set; }

            /// <summary>The zone for this replica pool.</summary>
            [Google.Apis.Util.RequestParameterAttribute("zone", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Zone { get; private set; }

            /// <summary>The name of the replica pool for this request.</summary>
            [Google.Apis.Util.RequestParameterAttribute("poolName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string PoolName { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{projectName}/zones/{zone}/pools/{poolName}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "zone", new Google.Apis.Discovery.Parameter
                    {
                        Name = "zone",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "poolName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "poolName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Inserts a new replica pool.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="projectName">The project ID for this replica pool.</param>
        /// <param name="zone">The zone for this
        /// replica pool.</param>
        public virtual InsertRequest Insert(Google.Apis.Replicapool.v1beta1.Data.Pool body, string projectName, string zone)
        {
            return new InsertRequest(service, body, projectName, zone);
        }

        /// <summary>Inserts a new replica pool.</summary>
        public class InsertRequest : ReplicapoolBaseServiceRequest<Google.Apis.Replicapool.v1beta1.Data.Pool>
        {
            /// <summary>Constructs a new Insert request.</summary>
            public InsertRequest(Google.Apis.Services.IClientService service, Google.Apis.Replicapool.v1beta1.Data.Pool body, string projectName, string zone)
                : base(service)
            {
                ProjectName = projectName;
                Zone = zone;
                Body = body;
                InitParameters();
            }


            /// <summary>The project ID for this replica pool.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectName { get; private set; }

            /// <summary>The zone for this replica pool.</summary>
            [Google.Apis.Util.RequestParameterAttribute("zone", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Zone { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Replicapool.v1beta1.Data.Pool Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "insert"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{projectName}/zones/{zone}/pools"; }
            }

            /// <summary>Initializes Insert parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "zone", new Google.Apis.Discovery.Parameter
                    {
                        Name = "zone",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>List all replica pools.</summary>
        /// <param name="projectName">The project ID for this request.</param>
        /// <param name="zone">The zone for this
        /// replica pool.</param>
        public virtual ListRequest List(string projectName, string zone)
        {
            return new ListRequest(service, projectName, zone);
        }

        /// <summary>List all replica pools.</summary>
        public class ListRequest : ReplicapoolBaseServiceRequest<Google.Apis.Replicapool.v1beta1.Data.PoolsListResponse>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string projectName, string zone)
                : base(service)
            {
                ProjectName = projectName;
                Zone = zone;
                InitParameters();
            }


            /// <summary>The project ID for this request.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectName { get; private set; }

            /// <summary>The zone for this replica pool.</summary>
            [Google.Apis.Util.RequestParameterAttribute("zone", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Zone { get; private set; }

            /// <summary>Maximum count of results to be returned. Acceptable values are 0 to 100, inclusive. (Default:
            /// 50)</summary>
            /// [default: 500]
            /// [minimum: 0]
            /// [maximum: 1000]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> MaxResults { get; set; }

            /// <summary>Set this to the nextPageToken value returned by a previous list request to obtain the next page
            /// of results from the previous list request.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{projectName}/zones/{zone}/pools"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "zone", new Google.Apis.Discovery.Parameter
                    {
                        Name = "zone",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "500",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Resize a pool. This is an asynchronous operation, and multiple overlapping resize requests can be
        /// made. Replica Pools will use the information from the last resize request.</summary>
        /// <param name="projectName">The project ID for this replica pool.</param>
        /// <param name="zone">The zone for this
        /// replica pool.</param>
        /// <param name="poolName">The name of the replica pool for this request.</param>
        public virtual ResizeRequest Resize(string projectName, string zone, string poolName)
        {
            return new ResizeRequest(service, projectName, zone, poolName);
        }

        /// <summary>Resize a pool. This is an asynchronous operation, and multiple overlapping resize requests can be
        /// made. Replica Pools will use the information from the last resize request.</summary>
        public class ResizeRequest : ReplicapoolBaseServiceRequest<Google.Apis.Replicapool.v1beta1.Data.Pool>
        {
            /// <summary>Constructs a new Resize request.</summary>
            public ResizeRequest(Google.Apis.Services.IClientService service, string projectName, string zone, string poolName)
                : base(service)
            {
                ProjectName = projectName;
                Zone = zone;
                PoolName = poolName;
                InitParameters();
            }


            /// <summary>The project ID for this replica pool.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectName { get; private set; }

            /// <summary>The zone for this replica pool.</summary>
            [Google.Apis.Util.RequestParameterAttribute("zone", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Zone { get; private set; }

            /// <summary>The name of the replica pool for this request.</summary>
            [Google.Apis.Util.RequestParameterAttribute("poolName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string PoolName { get; private set; }

            /// <summary>The desired number of replicas to resize to. If this number is larger than the existing number
            /// of replicas, new replicas will be added. If the number is smaller, then existing replicas will be
            /// deleted.</summary>
            [Google.Apis.Util.RequestParameterAttribute("numReplicas", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> NumReplicas { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "resize"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{projectName}/zones/{zone}/pools/{poolName}/resize"; }
            }

            /// <summary>Initializes Resize parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "zone", new Google.Apis.Discovery.Parameter
                    {
                        Name = "zone",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "poolName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "poolName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "numReplicas", new Google.Apis.Discovery.Parameter
                    {
                        Name = "numReplicas",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Update the template used by the pool.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="projectName">The project ID for this replica pool.</param>
        /// <param name="zone">The zone for this
        /// replica pool.</param>
        /// <param name="poolName">The name of the replica pool for this request.</param>
        public virtual UpdatetemplateRequest Updatetemplate(Google.Apis.Replicapool.v1beta1.Data.Template body, string projectName, string zone, string poolName)
        {
            return new UpdatetemplateRequest(service, body, projectName, zone, poolName);
        }

        /// <summary>Update the template used by the pool.</summary>
        public class UpdatetemplateRequest : ReplicapoolBaseServiceRequest<string>
        {
            /// <summary>Constructs a new Updatetemplate request.</summary>
            public UpdatetemplateRequest(Google.Apis.Services.IClientService service, Google.Apis.Replicapool.v1beta1.Data.Template body, string projectName, string zone, string poolName)
                : base(service)
            {
                ProjectName = projectName;
                Zone = zone;
                PoolName = poolName;
                Body = body;
                InitParameters();
            }


            /// <summary>The project ID for this replica pool.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectName { get; private set; }

            /// <summary>The zone for this replica pool.</summary>
            [Google.Apis.Util.RequestParameterAttribute("zone", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Zone { get; private set; }

            /// <summary>The name of the replica pool for this request.</summary>
            [Google.Apis.Util.RequestParameterAttribute("poolName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string PoolName { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Replicapool.v1beta1.Data.Template Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "updatetemplate"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{projectName}/zones/{zone}/pools/{poolName}/updateTemplate"; }
            }

            /// <summary>Initializes Updatetemplate parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "zone", new Google.Apis.Discovery.Parameter
                    {
                        Name = "zone",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "poolName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "poolName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "replicas" collection of methods.</summary>
    public class ReplicasResource
    {
        private const string Resource = "replicas";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public ReplicasResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Deletes a replica from the pool.</summary>
        /// <param name="body">The body of the request.</param>
        /// <param name="projectName">The project ID for this request.</param>
        /// <param name="zone">The zone where the
        /// replica lives.</param>
        /// <param name="poolName">The replica pool name for this request.</param>
        /// <param
        /// name="replicaName">The name of the replica for this request.</param>
        public virtual DeleteRequest Delete(Google.Apis.Replicapool.v1beta1.Data.ReplicasDeleteRequest body, string projectName, string zone, string poolName, string replicaName)
        {
            return new DeleteRequest(service, body, projectName, zone, poolName, replicaName);
        }

        /// <summary>Deletes a replica from the pool.</summary>
        public class DeleteRequest : ReplicapoolBaseServiceRequest<Google.Apis.Replicapool.v1beta1.Data.Replica>
        {
            /// <summary>Constructs a new Delete request.</summary>
            public DeleteRequest(Google.Apis.Services.IClientService service, Google.Apis.Replicapool.v1beta1.Data.ReplicasDeleteRequest body, string projectName, string zone, string poolName, string replicaName)
                : base(service)
            {
                ProjectName = projectName;
                Zone = zone;
                PoolName = poolName;
                ReplicaName = replicaName;
                Body = body;
                InitParameters();
            }


            /// <summary>The project ID for this request.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectName { get; private set; }

            /// <summary>The zone where the replica lives.</summary>
            [Google.Apis.Util.RequestParameterAttribute("zone", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Zone { get; private set; }

            /// <summary>The replica pool name for this request.</summary>
            [Google.Apis.Util.RequestParameterAttribute("poolName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string PoolName { get; private set; }

            /// <summary>The name of the replica for this request.</summary>
            [Google.Apis.Util.RequestParameterAttribute("replicaName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ReplicaName { get; private set; }


            /// <summary>Gets or sets the body of this request.</summary>
            Google.Apis.Replicapool.v1beta1.Data.ReplicasDeleteRequest Body { get; set; }

            ///<summary>Returns the body of the request.</summary>
            protected override object GetBody() { return Body; }

            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "delete"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{projectName}/zones/{zone}/pools/{poolName}/replicas/{replicaName}"; }
            }

            /// <summary>Initializes Delete parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "zone", new Google.Apis.Discovery.Parameter
                    {
                        Name = "zone",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "poolName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "poolName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "replicaName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "replicaName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Gets information about a specific replica.</summary>
        /// <param name="projectName">The project ID for this request.</param>
        /// <param name="zone">The zone where the
        /// replica lives.</param>
        /// <param name="poolName">The replica pool name for this request.</param>
        /// <param
        /// name="replicaName">The name of the replica for this request.</param>
        public virtual GetRequest Get(string projectName, string zone, string poolName, string replicaName)
        {
            return new GetRequest(service, projectName, zone, poolName, replicaName);
        }

        /// <summary>Gets information about a specific replica.</summary>
        public class GetRequest : ReplicapoolBaseServiceRequest<Google.Apis.Replicapool.v1beta1.Data.Replica>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string projectName, string zone, string poolName, string replicaName)
                : base(service)
            {
                ProjectName = projectName;
                Zone = zone;
                PoolName = poolName;
                ReplicaName = replicaName;
                InitParameters();
            }


            /// <summary>The project ID for this request.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectName { get; private set; }

            /// <summary>The zone where the replica lives.</summary>
            [Google.Apis.Util.RequestParameterAttribute("zone", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Zone { get; private set; }

            /// <summary>The replica pool name for this request.</summary>
            [Google.Apis.Util.RequestParameterAttribute("poolName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string PoolName { get; private set; }

            /// <summary>The name of the replica for this request.</summary>
            [Google.Apis.Util.RequestParameterAttribute("replicaName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ReplicaName { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{projectName}/zones/{zone}/pools/{poolName}/replicas/{replicaName}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "zone", new Google.Apis.Discovery.Parameter
                    {
                        Name = "zone",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "poolName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "poolName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "replicaName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "replicaName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Lists all replicas in a pool.</summary>
        /// <param name="projectName">The project ID for this request.</param>
        /// <param name="zone">The zone where the
        /// replica pool lives.</param>
        /// <param name="poolName">The replica pool name for this request.</param>
        public virtual ListRequest List(string projectName, string zone, string poolName)
        {
            return new ListRequest(service, projectName, zone, poolName);
        }

        /// <summary>Lists all replicas in a pool.</summary>
        public class ListRequest : ReplicapoolBaseServiceRequest<Google.Apis.Replicapool.v1beta1.Data.ReplicasListResponse>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string projectName, string zone, string poolName)
                : base(service)
            {
                ProjectName = projectName;
                Zone = zone;
                PoolName = poolName;
                InitParameters();
            }


            /// <summary>The project ID for this request.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectName { get; private set; }

            /// <summary>The zone where the replica pool lives.</summary>
            [Google.Apis.Util.RequestParameterAttribute("zone", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Zone { get; private set; }

            /// <summary>The replica pool name for this request.</summary>
            [Google.Apis.Util.RequestParameterAttribute("poolName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string PoolName { get; private set; }

            /// <summary>Maximum count of results to be returned. Acceptable values are 0 to 100, inclusive. (Default:
            /// 50)</summary>
            /// [default: 500]
            /// [minimum: 0]
            /// [maximum: 1000]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> MaxResults { get; set; }

            /// <summary>Set this to the nextPageToken value returned by a previous list request to obtain the next page
            /// of results from the previous list request.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{projectName}/zones/{zone}/pools/{poolName}/replicas"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "zone", new Google.Apis.Discovery.Parameter
                    {
                        Name = "zone",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "poolName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "poolName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = "500",
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Restarts a replica in a pool.</summary>
        /// <param name="projectName">The project ID for this request.</param>
        /// <param name="zone">The zone where the
        /// replica lives.</param>
        /// <param name="poolName">The replica pool name for this request.</param>
        /// <param
        /// name="replicaName">The name of the replica for this request.</param>
        public virtual RestartRequest Restart(string projectName, string zone, string poolName, string replicaName)
        {
            return new RestartRequest(service, projectName, zone, poolName, replicaName);
        }

        /// <summary>Restarts a replica in a pool.</summary>
        public class RestartRequest : ReplicapoolBaseServiceRequest<Google.Apis.Replicapool.v1beta1.Data.Replica>
        {
            /// <summary>Constructs a new Restart request.</summary>
            public RestartRequest(Google.Apis.Services.IClientService service, string projectName, string zone, string poolName, string replicaName)
                : base(service)
            {
                ProjectName = projectName;
                Zone = zone;
                PoolName = poolName;
                ReplicaName = replicaName;
                InitParameters();
            }


            /// <summary>The project ID for this request.</summary>
            [Google.Apis.Util.RequestParameterAttribute("projectName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ProjectName { get; private set; }

            /// <summary>The zone where the replica lives.</summary>
            [Google.Apis.Util.RequestParameterAttribute("zone", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string Zone { get; private set; }

            /// <summary>The replica pool name for this request.</summary>
            [Google.Apis.Util.RequestParameterAttribute("poolName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string PoolName { get; private set; }

            /// <summary>The name of the replica for this request.</summary>
            [Google.Apis.Util.RequestParameterAttribute("replicaName", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string ReplicaName { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "restart"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "POST"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "{projectName}/zones/{zone}/pools/{poolName}/replicas/{replicaName}/restart"; }
            }

            /// <summary>Initializes Restart parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "projectName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "projectName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "zone", new Google.Apis.Discovery.Parameter
                    {
                        Name = "zone",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "poolName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "poolName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "replicaName", new Google.Apis.Discovery.Parameter
                    {
                        Name = "replicaName",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }
}

namespace Google.Apis.Replicapool.v1beta1.Data
{    

    /// <summary>A Compute Engine network accessConfig. Identical to the accessConfig on corresponding Compute Engine
    /// resource.</summary>
    public class AccessConfig : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Name of this access configuration.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>An external IP address associated with this instance.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("natIp")]
        public virtual string NatIp { get; set; } 

        /// <summary>Type of this access configuration file. Currently only ONE_TO_ONE_NAT is supported.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>An action that gets executed during initialization of the replicas.</summary>
    public class Action : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>A list of commands to run, one per line. If any command fails, the whole action is considered a
        /// failure and no further actions are run. This also marks the virtual machine or replica as a
        /// failure.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("commands")]
        public virtual System.Collections.Generic.IList<string> Commands { get; set; } 

        /// <summary>A list of environment variables to use for the commands in this action.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("envVariables")]
        public virtual System.Collections.Generic.IList<EnvVariable> EnvVariables { get; set; } 

        /// <summary>If an action's commands on a particular replica do not finish in the specified timeoutMilliSeconds,
        /// the replica is considered to be in a FAILING state. No efforts are made to stop any processes that were
        /// spawned or created as the result of running the action's commands. The default is the max allowed value, 1
        /// hour (i.e. 3600000 milliseconds).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("timeoutMilliSeconds")]
        public virtual System.Nullable<int> TimeoutMilliSeconds { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Specifies how to attach a disk to a Replica.</summary>
    public class DiskAttachment : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The device name of this disk.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("deviceName")]
        public virtual string DeviceName { get; set; } 

        /// <summary>A zero-based index to assign to this disk, where 0 is reserved for the boot disk. If not specified,
        /// this is assigned by the server.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("index")]
        public virtual System.Nullable<long> Index { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>An environment variable to set for an action.</summary>
    public class EnvVariable : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Deprecated, do not use.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("hidden")]
        public virtual System.Nullable<bool> Hidden { get; set; } 

        /// <summary>The name of the environment variable.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>The value of the variable.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("value")]
        public virtual string Value { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A pre-existing persistent disk that will be attached to every Replica in the Pool in READ_ONLY
    /// mode.</summary>
    public class ExistingDisk : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>How the disk will be attached to the Replica.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("attachment")]
        public virtual DiskAttachment Attachment { get; set; } 

        /// <summary>The name of the Persistent Disk resource. The Persistent Disk resource must be in the same zone as
        /// the Pool.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("source")]
        public virtual string Source { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class HealthCheck : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>How often (in seconds) to make HTTP requests for this healthcheck. The default value is 5
        /// seconds.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("checkIntervalSec")]
        public virtual System.Nullable<int> CheckIntervalSec { get; set; } 

        /// <summary>The description for this health check.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("description")]
        public virtual string Description { get; set; } 

        /// <summary>The number of consecutive health check requests that need to succeed before the replica is
        /// considered healthy again. The default value is 2.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("healthyThreshold")]
        public virtual System.Nullable<int> HealthyThreshold { get; set; } 

        /// <summary>The value of the host header in the HTTP health check request. If left empty (default value), the
        /// localhost IP 127.0.0.1 will be used.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("host")]
        public virtual string Host { get; set; } 

        /// <summary>The name of this health check.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>The localhost request path to send this health check, in the format /path/to/use. For example,
        /// /healthcheck.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("path")]
        public virtual string Path { get; set; } 

        /// <summary>The TCP port for the health check requests.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("port")]
        public virtual System.Nullable<int> Port { get; set; } 

        /// <summary>How long (in seconds) to wait before a timeout failure for this healthcheck. The default value is 5
        /// seconds.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("timeoutSec")]
        public virtual System.Nullable<int> TimeoutSec { get; set; } 

        /// <summary>The number of consecutive health check requests that need to fail in order to consider the replica
        /// unhealthy. The default value is 2.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("unhealthyThreshold")]
        public virtual System.Nullable<int> UnhealthyThreshold { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A label to apply to this replica pool.</summary>
    public class Label : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The key for this label.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("key")]
        public virtual string Key { get; set; } 

        /// <summary>The value of this label.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("value")]
        public virtual string Value { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A Compute Engine metadata entry. Identical to the metadata on the corresponding Compute Engine
    /// resource.</summary>
    public class Metadata : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The fingerprint of the metadata. Required for updating the metadata entries for this
        /// instance.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fingerPrint")]
        public virtual string FingerPrint { get; set; } 

        /// <summary>A list of metadata items.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<MetadataItem> Items { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A Compute Engine metadata item, defined as a key:value pair. Identical to the metadata on the
    /// corresponding Compute Engine resource.</summary>
    public class MetadataItem : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>A metadata key.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("key")]
        public virtual string Key { get; set; } 

        /// <summary>A metadata value.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("value")]
        public virtual string Value { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A Compute Engine NetworkInterface resource. Identical to the NetworkInterface on the corresponding
    /// Compute Engine resource.</summary>
    public class NetworkInterface : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>An array of configurations for this interface. This specifies how this interface is configured to
        /// interact with other network services.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("accessConfigs")]
        public virtual System.Collections.Generic.IList<AccessConfig> AccessConfigs { get; set; } 

        /// <summary>Name the Network resource to which this interface applies.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("network")]
        public virtual string Network { get; set; } 

        /// <summary>An optional IPV4 internal network address to assign to the instance for this network
        /// interface.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("networkIp")]
        public virtual string NetworkIp { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A Persistent Disk resource that will be created and attached to each Replica in the Pool. Each Replica
    /// will have a unique persistent disk that is created and attached to that Replica in READ_WRITE mode.</summary>
    public class NewDisk : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>How the disk will be attached to the Replica.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("attachment")]
        public virtual DiskAttachment Attachment { get; set; } 

        /// <summary>If true, then this disk will be deleted when the instance is deleted. The default value is
        /// true.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("autoDelete")]
        public virtual System.Nullable<bool> AutoDelete { get; set; } 

        /// <summary>If true, indicates that this is the root persistent disk.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("boot")]
        public virtual System.Nullable<bool> Boot { get; set; } 

        /// <summary>Create the new disk using these parameters. The name of the disk will be -</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("initializeParams")]
        public virtual NewDiskInitializeParams InitializeParams { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Initialization parameters for creating a new disk.</summary>
    public class NewDiskInitializeParams : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The size of the created disk in gigabytes.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("diskSizeGb")]
        public virtual System.Nullable<long> DiskSizeGb { get; set; } 

        /// <summary>Name of the disk type resource describing which disk type to use to create the disk. For example
        /// 'pd-ssd' or 'pd-standard'. Default is 'pd-standard'</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("diskType")]
        public virtual string DiskType { get; set; } 

        /// <summary>The name or fully-qualified URL of a source image to use to create this disk. If you provide a name
        /// of the source image, Replica Pool will look for an image with that name in your project. If you are
        /// specifying an image provided by Compute Engine, you will need to provide the full URL with the correct
        /// project, such as: http://www.googleapis.com/compute/v1/projects/debian-cloud/ global/images/debian-
        /// wheezy-7-vYYYYMMDD</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("sourceImage")]
        public virtual string SourceImage { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class Pool : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Whether replicas in this pool should be restarted if they experience a failure. The default value
        /// is true.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("autoRestart")]
        public virtual System.Nullable<bool> AutoRestart { get; set; } 

        /// <summary>The base instance name to use for the replicas in this pool. This must match the regex
        /// [a-z]([-a-z0-9]*[a-z0-9])?. If specified, the instances in this replica pool will be named in the format -.
        /// The  postfix will be a four character alphanumeric identifier generated by the service.
        ///
        /// If this is not specified by the user, a random base instance name is generated by the service.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("baseInstanceName")]
        public virtual string BaseInstanceName { get; set; } 

        /// <summary>[Output Only] The current number of replicas in the pool.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("currentNumReplicas")]
        public virtual System.Nullable<int> CurrentNumReplicas { get; set; } 

        /// <summary>An optional description of the replica pool.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("description")]
        public virtual string Description { get; set; } 

        /// <summary>Deprecated. Please use template[].healthChecks instead.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("healthChecks")]
        public virtual System.Collections.Generic.IList<HealthCheck> HealthChecks { get; set; } 

        /// <summary>The initial number of replicas this pool should have. You must provide a value greater than or
        /// equal to 0.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("initialNumReplicas")]
        public virtual System.Nullable<int> InitialNumReplicas { get; set; } 

        /// <summary>A list of labels to attach to this replica pool and all created virtual machines in this replica
        /// pool.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("labels")]
        public virtual System.Collections.Generic.IList<Label> Labels { get; set; } 

        /// <summary>The name of the replica pool. Must follow the regex [a-z]([-a-z0-9]*[a-z0-9])? and be 1-28
        /// characters long.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>Deprecated! Use initial_num_replicas instead.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("numReplicas")]
        public virtual System.Nullable<int> NumReplicas { get; set; } 

        /// <summary>The list of resource views that should be updated with all the replicas that are managed by this
        /// pool.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("resourceViews")]
        public virtual System.Collections.Generic.IList<string> ResourceViews { get; set; } 

        /// <summary>[Output Only] A self-link to the replica pool.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

        /// <summary>Deprecated, please use target_pools instead.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("targetPool")]
        public virtual string TargetPool { get; set; } 

        /// <summary>A list of target pools to update with the replicas that are managed by this pool. If specified, the
        /// replicas in this replica pool will be added to the specified target pools for load balancing purposes. The
        /// replica pool must live in the same region as the specified target pools. These values must be the target
        /// pool resource names, and not fully qualified URLs.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("targetPools")]
        public virtual System.Collections.Generic.IList<string> TargetPools { get; set; } 

        /// <summary>The template to use when creating replicas in this pool. This template is used during initial
        /// instance creation of the pool, when growing the pool in size, or when a replica restarts.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("template")]
        public virtual Template Template { get; set; } 

        /// <summary>Deprecated! Do not set.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class PoolsDeleteRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>If there are instances you would like to keep, you can specify them here. These instances won't be
        /// deleted, but the associated replica objects will be removed.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("abandonInstances")]
        public virtual System.Collections.Generic.IList<string> AbandonInstances { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class PoolsListResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("resources")]
        public virtual System.Collections.Generic.IList<Pool> Resources { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>An individual Replica within a Pool. Replicas are automatically created by the replica pool, using the
    /// template provided by the user. You cannot directly create replicas.</summary>
    public class Replica : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Output Only] The name of the Replica object.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>[Output Only] The self-link of the Replica.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("selfLink")]
        public virtual string SelfLink { get; set; } 

        /// <summary>[Output Only] Last known status of the Replica.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("status")]
        public virtual ReplicaStatus Status { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>The current status of a Replica.</summary>
    public class ReplicaStatus : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>[Output Only] Human-readable details about the current state of the replica</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("details")]
        public virtual string Details { get; set; } 

        /// <summary>[Output Only] The state of the Replica.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("state")]
        public virtual string State { get; set; } 

        /// <summary>[Output Only] The template used to build the replica.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("templateVersion")]
        public virtual string TemplateVersion { get; set; } 

        /// <summary>[Output Only] Link to the virtual machine that this Replica represents.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("vmLink")]
        public virtual string VmLink { get; set; } 

        /// <summary>[Output Only] The time that this Replica got to the RUNNING state, in RFC 3339 format. If the start
        /// time is unknown, UNKNOWN is returned.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("vmStartTime")]
        public virtual string VmStartTime { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class ReplicasDeleteRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Whether the instance resource represented by this replica should be deleted or abandoned. If
        /// abandoned, the replica will be deleted but the virtual machine instance will remain. By default, this is set
        /// to false and the instance will be deleted along with the replica.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("abandonInstance")]
        public virtual System.Nullable<bool> AbandonInstance { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class ReplicasListResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("resources")]
        public virtual System.Collections.Generic.IList<Replica> Resources { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A Compute Engine service account, identical to the Compute Engine resource.</summary>
    public class ServiceAccount : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The service account email address, for example: 123845678986@project.gserviceaccount.com</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("email")]
        public virtual string Email { get; set; } 

        /// <summary>The list of OAuth2 scopes to obtain for the service account, for example:
        /// https://www.googleapis.com/auth/devstorage.full_control</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("scopes")]
        public virtual System.Collections.Generic.IList<string> Scopes { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A Compute Engine Instance tag, identical to the tags on the corresponding Compute Engine Instance
    /// resource.</summary>
    public class Tag : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The fingerprint of the tag. Required for updating the list of tags.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("fingerPrint")]
        public virtual string FingerPrint { get; set; } 

        /// <summary>Items contained in this tag.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<string> Items { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>The template used for creating replicas in the pool.</summary>
    public class Template : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>An action to run during initialization of your replicas. An action is run as shell commands which
        /// are executed one after the other in the same bash shell, so any state established by one command is
        /// inherited by later commands.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("action")]
        public virtual Action Action { get; set; } 

        /// <summary>A list of HTTP Health Checks to configure for this replica pool and all virtual machines in this
        /// replica pool.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("healthChecks")]
        public virtual System.Collections.Generic.IList<HealthCheck> HealthChecks { get; set; } 

        /// <summary>A free-form string describing the version of this template. You can provide any versioning string
        /// you would like. For example, version1 or template-v1.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("version")]
        public virtual string Version { get; set; } 

        /// <summary>The virtual machine parameters to use for creating replicas. You can define settings such as the
        /// machine type and the image of replicas in this pool. This is required if replica type is SMART_VM.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("vmParams")]
        public virtual VmParams VmParams { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Parameters for creating a Compute Engine Instance resource. Most fields are identical to the
    /// corresponding Compute Engine resource.</summary>
    public class VmParams : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Deprecated. Please use baseInstanceName instead.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("baseInstanceName")]
        public virtual string BaseInstanceName { get; set; } 

        /// <summary>Enables IP Forwarding, which allows this instance to receive packets destined for a different IP
        /// address, and send packets with a different source IP. See IP Forwarding for more information.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("canIpForward")]
        public virtual System.Nullable<bool> CanIpForward { get; set; } 

        /// <summary>An optional textual description of the instance.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("description")]
        public virtual string Description { get; set; } 

        /// <summary>A list of existing Persistent Disk resources to attach to each replica in the pool. Each disk will
        /// be attached in read-only mode to every replica.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("disksToAttach")]
        public virtual System.Collections.Generic.IList<ExistingDisk> DisksToAttach { get; set; } 

        /// <summary>A list of Disk resources to create and attach to each Replica in the Pool. Currently, you can only
        /// define one disk and it must be a root persistent disk. Note that Replica Pool will create a root persistent
        /// disk for each replica.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("disksToCreate")]
        public virtual System.Collections.Generic.IList<NewDisk> DisksToCreate { get; set; } 

        /// <summary>The machine type for this instance. The resource name (e.g. n1-standard-1).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("machineType")]
        public virtual string MachineType { get; set; } 

        /// <summary>The metadata key/value pairs assigned to this instance.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("metadata")]
        public virtual Metadata Metadata { get; set; } 

        /// <summary>A list of network interfaces for the instance. Currently only one interface is supported by Google
        /// Compute Engine, ONE_TO_ONE_NAT.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("networkInterfaces")]
        public virtual System.Collections.Generic.IList<NetworkInterface> NetworkInterfaces { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("onHostMaintenance")]
        public virtual string OnHostMaintenance { get; set; } 

        /// <summary>A list of Service Accounts to enable for this instance.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("serviceAccounts")]
        public virtual System.Collections.Generic.IList<ServiceAccount> ServiceAccounts { get; set; } 

        /// <summary>A list of tags to apply to the Google Compute Engine instance to identify resources.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("tags")]
        public virtual Tag Tags { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }
}
